/************************************************************************
 *
 * errno.h
 *
 * (c) Copyright 2001-2005 Analog Devices, Inc.  All rights reserved.
 * (c) Copyright 1992-2005 by P.J. Plauger.  ALL RIGHTS RESERVED.
 * $Revision: 1.5 $
 ************************************************************************/

#pragma once
#ifndef __NO_BUILTIN
#pragma system_header /* errno.h */
#endif

/* errno.h standard header */
#ifndef _ERRNO
#define _ERRNO
#ifndef _YVALS
 #include <yvals.h>
#endif /* _YVALS */

_C_STD_BEGIN

		/* ERROR CODES */
#define EDOM           0x0021
#define EFAULT         0x000E
#define EFBIG          0x001B
#define EFPOS          0x0098
#define EMLINK         0x001F
#define ENFILE         0x0017
#define ENOENT         0x0002
#define ENOSPC         0x001C
#define ENOTTY         0x0019
#define EPIPE          0x0020
#define ERANGE         0x0022
#define EROFS          0x001E
#define ESPIPE         0x001D

#define EBADMSG       0x004D
#define ECANCELED     0x002F
#define EDEADLK       0x002D
#define EILSEQ        0x0058
#define EINPROGRESS   0x0096
#define EMSGSIZE      0x0061
#define ENAMETOOLONG  0x004E
#define ENOLCK        0x002E
#define ENOSYS        0x0059
#define ENOTEMPTY     0x005D
#define ENOTSUP       0x0030
#define ETIMEDOUT     0x0091

		/* DECLARATIONS */
_C_LIB_DECL

#if !defined(_ADI_THREADS) && !defined(_OSE_THREADS) && \
      !defined(__ADI_MULTICORE)
  extern int _TLS_QUAL errno;

 #else /* !_ADI_THREADS || !_OSE_THREADS && !__ADI_MULTICORE */
int *_Geterrno(void);

#ifdef  _USING_DINKUM_C_LIBRARY
  extern int* _Geterrno(void);
  #define errno (*(_Geterrno()))
#else
  extern int* ___errno(void);
  #define errno (*(___errno()))
#endif

#endif /* !_ADI_THREADS && !_OSE_THREADS && !__ADI_MULTICORE */

_END_C_LIB_DECL
_C_STD_END

#ifdef _STD_USING
using std::errno;
#endif /* _STD_USING */

#endif /* _ERRNO */

 #if defined(_STD_USING)
 #endif /* defined(_STD_USING) */

